package com.cool.modules.finance.entity.account;

import com.cool.core.base.BaseEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.tangzc.mybatisflex.autotable.annotation.ColumnDefine;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "finance_trial_balance")
public class FinanceTrialBalanceEntity extends BaseEntity<FinanceTrialBalanceEntity> {


    @ColumnDefine(comment = "账户id",notNull = true,type = "bigint")
    private Long accountId;

    @Column(ignore = true)
    private String accountName;

    @Column(ignore = true)
    private String accountUserName;

    @ColumnDefine(comment = "赎回日期",type = "date")
    private Date redeemDate;

    @ColumnDefine(comment = "币种id",notNull = true,type = "bigint")
    private Long coinId;

    @ColumnDefine(comment = "币种名称",notNull = true,type = "varchar(255)")
    private String coinName;

    @ColumnDefine(comment = "币种符号",notNull = true,type = "varchar(255)")
    private String coinSymbol;

    @ColumnDefine(comment = "试算天数",notNull = true,type = "bigint")
    private Long days;

    @ColumnDefine(comment = "本金",notNull = true,type = "decimal(10,2)")
    private BigDecimal capital;

    @ColumnDefine(comment = "利息",notNull = true,type = "decimal(10,2)")
    private BigDecimal interest;

    @ColumnDefine(comment = "利率",notNull = true,type = "decimal(10,2)")
    private BigDecimal rate;

    @ColumnDefine(comment = "中位利率",type = "decimal(10,2)")
    private BigDecimal medianRate;

    @ColumnDefine(comment = "试算时间",type = "datetime")
    private Date trialDate;

    @ColumnDefine(comment = "是否最终试算",notNull = true,defaultValue = "false",type = "tinyint(1)")
    private Boolean isFinal;

    /** 记账时间区域**/
    @Column(ignore = true)
    private List<Date> dateRange;

    @Column(ignore = true)
    private List<Date> trialRange;

    /**
     * 转账金额
     */
    @Column(ignore = true)
    private BigDecimal transferMoney;

    /**
     * 转账时间
     */
    @Column(ignore = true)
    private Date transferTime;

    /**
     * 备注
     */
    @ColumnDefine(comment = "备注",type = "varchar(255)")
    private String remark;

}
